package com.yiwei.hdb.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * Created by xsooy-pc on 2017/6/23.
 */

public class PayWayModel extends ResponseModel {

    public ArrayList<DataBean> data;
    public int bonus_number;
    public int allow_stages;//是否允许分期：0 - 否、1 -  是
    public static class DataBean implements Parcelable {
        /**
         * payment_id : 18
         * payment_name : 支付宝
         * payment_description : 支付宝付款
         * payment_logo : http://img3.dob500.cn/2016/11/01/201611011901405766.jpg
         * payment_class_name : ALI_APP
         */

        public int payment_id;
        public String payment_name;
        public String payment_description;
        public String payment_logo;
        public String payment_class_name;
        public boolean isCheck = false;


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.payment_id);
            dest.writeString(this.payment_name);
            dest.writeString(this.payment_description);
            dest.writeString(this.payment_logo);
            dest.writeString(this.payment_class_name);
            dest.writeByte(this.isCheck ? (byte) 1 : (byte) 0);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.payment_id = in.readInt();
            this.payment_name = in.readString();
            this.payment_description = in.readString();
            this.payment_logo = in.readString();
            this.payment_class_name = in.readString();
            this.isCheck = in.readByte() != 0;
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
}
